{% extends 'base.html' %}
{% load staticfiles %}
{% load myLibrary %}
{% block left_content %}
<article>
  <div class="l_box f_l">
    <div class="postdate">
      <div class="month">{{ article.date_publish | date:'m' | upper}}</div>
      <div class="date">{{ article.date_publish | date:'d' }}</div>
    </div>
    <div class="title">
        <h2><a href="http://www.baidu.org/?p=542" rel="bookmark" title="{{ article.title }}">{{ article.title }}</a></h2>
        <div class="postmeta">
          <span class="postmeta_author">{{ article.user }}</span>
          <span class="postmeta_category"><a href="http://www.baidu.org/?cat=14"> {{ article.category }}</a></span>          
          <span class="postmeta_time">{{ article.date_publish | date:'Y-m-d' }}</span>
        </div><!-- end postmeta -->
        <div class="entry">
         {{ article.content | safe }} 
        </div>
	{% for tag in tags %}
        <span class="tags"><a href="http://www.baidu.org/?tag=android" rel="tag">{{tag.name }}</a>
	{% endfor %}
      <div class="info">
        Address:  <a href="{{site_url}}/article/?id={{article.id}}" rel="bookmark" title="{{article.title}}">{{site_url}}/article/?id={{article.id}}</a>
      </div>

      <div class="commentstitle"><span class="trackback"><a href="http://www.baidu.org/wp-trackback.php?p=542" rel="trackback" title="Trackback URI"></a></span><h3 id="comments"><span class="commentsnumber">only 1 comment</span> untill now</h3></div>

      <ol class="commentlist">
	{% for comment in comment_list %}
                    <li class="alt" >
                <div class="top"><a href='http://www.yopoing.com' rel='external nofollow' class='url'>{{comment.user}}</a><span class="time"> @ <a href="#comment-59418" title="">{{ comment.date_publish | date:'Y-m-d h:i:s' }}</a></span></div>
                <div><img alt='' src='images/default.jpg' class='avatar avatar-32 photo' height='32' width='32' /></div>
                
                <div class="body">
                                <p>{{ comment.content }}</p>
                </div>
              </li>
		{% for comment_children in comment.children_comment %}
              <li class="alt">
                <div class="reply">
                  <div class="top"><a href="http://xnbing.org" rel="external nofollow" class="url">{{ comment_children.user }}</a><span class="time"> @ <a href="#comment-59543" title="">{{ comment_children.date_publish | date:'Y-m-d h:i:s' }}</a></span></div>
                  <div><img alt="" src="http://1.gravatar.com/avatar/f7c05a53670301b5b3c226eb8c2b93c0?s=32&amp;d=&amp;r=G" class="avatar avatar-32 photo" height="32" width="32"></div>
                  
                  <div class="body">
                                        {{ comment_children.content }}                  </div>
                </div>
              </li>

		{% endfor %}

	{% endfor %}
    <h3 id="respond">Add your comment now</h3>

    <div class='login_info'>还没有登陆？可以登录后再评论哦。<big><a href="{% url 'do_login'%}">&raquo;去登录</a>&nbsp;<a href="{% url 'do_reg' %}">&raquo;去注册</a></big></div>

    <form action="{% url 'comment_post' %}" method="post" id="commentform">
	{% csrf_token %}

    <p>{{ comment_form.username }}</p>

    <p>{{ comment_form.email}}</p>

    <p>{{ comment_form.url }}</p>


    <!--<p><small><strong>XHTML:</strong> You can use these tags: &lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code class=&quot;&quot; title=&quot;&quot; data-url=&quot;&quot;&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; &lt;pre class=&quot;&quot; title=&quot;&quot; data-url=&quot;&quot;&gt; &lt;span class=&quot;&quot; title=&quot;&quot; data-url=&quot;&quot;&gt; </small></p>-->

    <p>{{ comment_form.content }}</p>
	<div style="display: none;">{{ comment_form.article }}</div>
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit" class="button" />
    <input type="hidden" name="comment_post_ID" value="542" />
    <p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="999f94e7bf" /></p><p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="87"/></p></p>

    </form>
	<a href="{% url 'do_logout' %}">注销</a>
    </div>
    </div>

  </div>
</article>
{% endblock %}
